﻿<!DOCTYPE html
          PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- InstanceBegin template="/Templates/home-template.dwt" codeOutsideHTMLIsLocked="false" -->

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!-- InstanceBeginEditable name="doctitle" -->
    <title>导航</title>
    <link rel="stylesheet" type="text/css" href="/css/public.css" />
    <link rel="stylesheet" type="text/css" href="/css/home-nav.css" />
    <link rel="stylesheet" type="text/css" href="/css/household.css" />
    <link rel="stylesheet" type="text/css" href="/css/goods-detail.css" />
    <!-- InstanceEndEditable -->
    <!-- InstanceBeginEditable name="head" -->
    <!-- InstanceEndEditable -->
</head>

<body>

    <!--<div id="main">
        <div class="header-nav nav-bg">-->
    <!--<div class="top">
      <span class="">广东 广州 &nbsp; |&nbsp;</span>
      <span class=""><a href="#">admin </a> &nbsp; |&nbsp;</span>
      <span class=""><a href="#">购物车 </a> &nbsp; |&nbsp;</span>
      <span class=""><a href="#">问题反馈 </a> &nbsp; |&nbsp;</span>
      <span class=""><a href="#">关于我们 </a> </span>
      <span class="xgs-offset4">
      <a href="#">登录</a> &nbsp; |&nbsp;
      <a href="#">注册</a>
      </span>
      </div>-->
    <!--<div class="top">
        <div class="xgs-col6">
            <span class="">
                <img src="/img/icon/location.png" height="18" width="18"
                     style="margin-top: 8px; float: left;display: inline-block;margin-top: 3px;" />
                &nbsp;&nbsp; 广东 广州
            </span>
        </div>
        <div class="xgs-col6">
            <span class="xgs-offset5" style="display: inline-flex;">-->
    <!-- <a href="#">登录</a> &nbsp; |&nbsp;
      <a href="#">注册</a> -->
    <!--<a href="userinfo.html">
                            <img src="/img/home/iconmonstr-user-20-240.png"
                                 style="border-radius: 15%;width: 18px;height: 18px;line-height: 28px;float:left;margin-top:4px" />
                            &nbsp;
                            <span style="line-height:27px">
                                admin &nbsp; |&nbsp;
                            </span>
                        </a>
                        <span>
                            <a href="userinfo.html">
                                购物车
                            </a>
                            &nbsp; |&nbsp;
                        </span>
                        <span onclick="ideaForm()">
                            <a href="javascript:void(0);">
                                问题反馈
                            </a>
                            &nbsp; |&nbsp;
                        </span>
                        <span>
                            <a href="about.html">
                                关于我们
                            </a>
                        </span>
                    </span>
                </div>
            </div>
        </div>
        <div class="header-top" style="clear:left">
            <div class="header-body" id="header-body" style="margin: auto;display: block; width: 1030px;">
                <ul id="header-nav">
                    <li class="float-left">
                        <a href="#">
                            <img src="/img/logo.png" height="50" style="margin-top: 15px;" />
                        </a>
                    </li>
                    <li class="float-left" id="index-navitem">
                        <a href="javascript:void(0);" onclick="navEven('index.html')">
                            首页
                        </a>
                    </li>
                    <li class="float-left" id="book-market-navitem">
                        <a href="javascript:void(0);" onclick="navEven('market.html')">
                            图书音像
                        </a>
                    </li>
                    <li class="float-left" id="about-us-navitem">
                        <a href="javascript:void(0);" onclick="navEven('about.html')">
                            关于我们
                        </a>
                    </li>
                </ul>
            </div>
        </div>
    </div>-->
    <!-- 意见反馈 -->
    @*<div class="question white-panel"
             style="position: absolute;top: 300px;left: 30%;z-index:1; width: 500px;display:none;" id="question">
            <div id="" style="display: block;position: absolute;right: 10px;top:10px" onclick="ideaFormClose()">
                <img src="/img/icon/iconmonstr-x-mark-7-240.png" width="24" height="24">
            </div>
            <h3 style="text-align: center;line-height: 32px;margin: 20px 0;">
                意见反馈
            </h3>
            <form action="#" method="post" class="form">
                <div class="form-item">
                    <span>
                        姓名：
                    </span>
                    <input type="text" name="" id="" value="" />
                </div>
                <div class="form-item">
                    <span>
                        联系方式：
                    </span>
                    <input type="text" name="" id="" value="" />
                </div>
                <div class="form-item">
                    <span>
                        问题：
                    </span>
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    <textarea rows="10" cols="27">
              </textarea>
                </div>
                <div class="btn-goup" style="display: block;">
                    <button type="button" class="submit-btn">
                        提交
                    </button>
                    <button type="reset" class="submit-btn">
                        重置
                    </button>
                </div>
            </form>
        </div>*@
    <!-- 、意见反馈 -->
    ﻿@using Store.Models.Database;
    @{
        var good = ViewData["Good"] as Good;
    }
    <div class="container">
        <!-- InstanceBeginEditable name="MainBody" -->
        <div class="goods-detail" onload="init()">
            <div class="xgs-row" style="background-color: white;padding: 30px 0;">
                <div class="detail-panel" style="width: 100%;">
                    <div class="xgs-col3">
                        <img id="pic" src="@good.Cover" height="180" align="center" style="margin: auto;display: block;" />
                    </div>
                    <div class="xgs-col9">
                        <h3 id="goods-title" class="goods-title">@good.Name</h3>
                        <ul id="attr">
                            <li>
                                <span style="float: left;">
                                    价格：
                                </span>
                                <h3 id="price" style="color: red;">@good.Price</h3>
                            </li>
                        </ul>
                        <br />
                        <div class="btn-group" style="display: block; padding-left: 50px;">
                            <!-- <button class="orderBtn" type="button">立即购买</button> -->
                            <button class="orderBtn" type="button">加入购物车</button>
                        </div>
                    </div>
                </div>
            </div>
            <!-- 商品详情 -->
            <div class="detail-body">
                <div class="xgs-row" style="padding: 0;background-color: white;margin-top: 20px;">
                    <ul class="household-navtab" style="display: inline-block;">
                        <li>
                            <a style="background-color: #69c0ff;color: white;" href="javascript:void(0);"
                               onclick="jumpTab('content',this)">商品详情</a>
                        </li>
                        <!-- <li><a href="javascript:void(0);" onclick="jumpTab('guige',this)">参数规格</a></li> -->
                    </ul>
                </div>
                <div class="tab-item" style="padding: 20px 0;background-color: white;">
                    <!-- 商品详情 -->
                    <div id="content" class="content">

                    </div>
                    <!-- /商品详情 -->
                </div>

            </div>
            <!-- /商品详情 -->
        </div>
        @section script
{
            <script src="https://code.jquery.com/jquery-3.6.0.min.js" type="text/javascript" charset="utf-8"></script>
            <script type="text/javascript">
        //页面加载完成后绑定事件
        $(function () {

            //绑定登录按钮点击事件
            $(".orderBtn").on("click",
                function () {
                           //用户点击 加入购物车 按钮
                    //点击事件  请求后端方法 发送数据（商品Id）  后端执行加入逻辑
                    var goodId = @good.Id;
                    $.post('/home/AddCar', { goodId: goodId}, function (data, success) {
                        alert(data);
                    });
                });
        })
            </script>
        }
        <!-- InstanceEndEditable -->
    </div>
    <div class="footer">

        <div class="foot-body" style="margin: auto;width: 61%;">

            <ul>
                <li><a href="about.html">常见问题</a></li>
                <li><a href="about.html">关于我们</a></li>
                <li>客服QQ：1919399938</li>
                <li>客服微信：xgs39938</li>
            </ul>
            <p style="color: white;clear: left;text-align: center;">Copyright © 2012-2021 Tencent. All Rights Reserved.</p>
        </div>

    </div>
    <script src="/js/public.js" type="text/javascript" charset="utf-8">
    </script>
</body>

<!-- InstanceEnd -->

</html>
